home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 145 / 145.d81 / t.disc c < prev    next >
Text File  |  2022-08-26  |  9KB  |  357 lines

  1.  
  2.  
  3.  
  4.  
  5.        Heaven in the net
  6.        an unedited excerpt
  7.         of IRC on #c-64
  8.  
  9.         by Mike Gordillo
  10.  
  11.  
  12.     Note from Jeff: Ooops! I, er,
  13. kinda fixed a few spelling and
  14. capitalization errors -- so this
  15. piece is "mostly unedited."
  16.  
  17.     As a self-proclaimed "demo
  18. freak", the following transcript
  19. (largely unedited) represents one of
  20. the most interesting discussions
  21. concerning C-64 that I have ever
  22. witnessed on IRC (Internet Relay
  23. Chat) or any other venue.  I present
  24. this to the reader in the hopes of
  25. encouraging further participation and
  26. patronage of IRC channel #c-64.  We
  27. begin in the middle of a dissection
  28. of VIC chip internals by Firefoot.
  29.  
  30.     [Mike:] Can anything go on
  31. system-wise when a bad line is being
  32. "serviced" so to speak?  
  33.  
  34.     [Firefoot:] "BAD" lines are just
  35. another way of specifying the lines
  36. where the VIC steals 40 cycles from
  37. the CPU to do a screen refresh.  You
  38. can  delay the bad lines, and push
  39. the whole screen down (FLD).  You can
  40. force them to occur every line (FLI).
  41. You can turn them off (blanking the
  42. screen).  You can move them
  43. horizontally (VSP).  
  44.  
  45.     [Firefoot:] The CPU isn't halted,
  46. it is busy helping the VIC chip out.
  47. Any code that you are executing is
  48. "halted".  
  49.  
  50.     [Waveform:] I never understood
  51. VSP. I thought the VIC brought the
  52. CPU off-line so it could sweep in all
  53. the data for the bitmap in those 40
  54. cycles (for the next 8 lines).
  55.  
  56.     [Firefoot:] No, nothing can go on
  57. system-wise when a bad line is being
  58. serviced, not in terms of the CPU
  59. anyway.
  60.  
  61.     [Firefoot:] Wave - I guess that
  62. would be functionally identical.  I
  63. guess it depends on whether or not
  64. you consider the bus part of the
  65. cpu.
  66.  
  67.     [Waveform:] The VIC reads its
  68. data independent of the CPU, but...I
  69. still never understood VSP. =)
  70.  
  71.     [Mike:] Yeah, but the CPU and the
  72. VIC chip can't share the bus at
  73. once.
  74.  
  75.     [Firefoot:] I never understood
  76. VSP well. There is something about
  77. how tricky stuff with $d011 can cause
  78. the VIC to think it has started a new
  79. scanline, when, infact, it has not.
  80.  
  81.     [Mike:] Well..explain FLD for me
  82. then, Firefoot. :)
  83.  
  84.     [Waveform:] FLD is easy but FLI
  85. is not as easy and VSP scares me.
  86.  
  87.     [Firefoot:] I've coded VSP, but
  88. never understood it either.  However
  89. I do understand FLD.  You just keep
  90. playing with $d011 (every scan line)
  91. so that the VIC keeps thinking that
  92. the [NEXT] scan line is the one where
  93. it is supposed to do the refresh of
  94. screen memory. When you stop doing
  95. this, it starts drawing the screen
  96. where it left off.
  97.  
  98.     [Waveform:] Exactly, FLD is very
  99. easy to understand but what about
  100. VSP?
  101.  
  102.     [Firefoot:] Actually, I stumbled
  103. across VSP when coding FLI.
  104.  
  105.     [Waveform:] FLI is essentially
  106. the same thing as FLD. Except that
  107. instead of making the VIC think the
  108. next scan line is where its supposed
  109. to draw the screen, FLI makes the VIC
  110. think the current line is the one to
  111. draw on - but you do it on every
  112. line.
  113.  
  114.     [Firefoot:] Well, wave, think of
  115. VSP as the same thing as FLD except
  116. instead of pushing the screen down
  117. scan lines, you push it across
  118. cycles.  Also, try changing the delay
  119. at the beginning of an FLI routine,
  120. and you will see the screen shift
  121. over... voila, vsp!
  122.  
  123.     [Waveform:] Well, I just recently
  124. got a stable raster (double interrupt
  125. style) so I haven't actually done
  126. anything that specific (FLI for
  127. example) though FLD is very
  128. forgiving. You can do nifty FLD with
  129. virtually no timing at all.
  130.  
  131.     [Mike:] No timing for FLD?  ok...
  132. Why am *I* having such a hard time
  133. putting sprites over FLD then!
  134.  
  135.     [Firefoot:] FLI can be made very
  136. forgiving as well (no stable raster
  137. needed).
  138.  
  139.     [Waveform:] Firefoot: It actually
  140. uses the CPU's Phi cycle as well as
  141. the VIC Phi cycle.
  142.  
  143.     [Waveform:] Fire: That is
  144. probably what you are remembering.
  145.  
  146.     [Firefoot:] Well, with FLI it
  147. *is* nice to use a stable interrupt.
  148. I use the double raster method as
  149. well, always seemed the cleanest to
  150. me.
  151.  
  152.     [Firefoot:] Oh, it is not easy to
  153. put sprites over FLD.  You have to
  154. make sure that your delay each line
  155. is exactly correct.  Very weird
  156. code... I did that and sprite over
  157. FLI with almost the same routine.
  158. ugh.
  159.  
  160.     [Firefoot:] Wave: That's
  161. *exactly* what I am remembering.
  162.  
  163.     [Waveform:] Fire: the phi thing?
  164.  
  165.     [Mike:] When the FLD bounces
  166. down...there -seems- to be a screen
  167. area behind it!
  168.  
  169.     [Firefoot:] Mike, basically what
  170. I did is constructed a section of
  171. unrolled FLI/FLD code, and played
  172. with the delay instructions each time
  173. I moved the sprites so that the
  174. timing was always correct.
  175.  
  176.     [Firefoot:] Wave, yes, the phi
  177. thing.  From the appendix about the
  178. vic chip. It was very informative.
  179.  
  180.     [Mike:] Ok...I've heard these
  181. $xfff addies pop up over and over and
  182. I guess that explains why the some of
  183. my pics have those lines behind the
  184. FLD!
  185.  
  186.     [Firefoot:] Mike, the area behind
  187. the FLD is taken from the last byte
  188. of the video bank ($3fff, $7fff,
  189. $bfff, or $ffff).  It is also what
  190. you see when you open up the
  191. borders.
  192.  
  193.     [Mike:] Gawd, those annoying
  194. lines... I couldn't figure out where
  195. they were coming from.
  196.  
  197.     [Waveform:] Make VICBASE+$3fff
  198. equal to 0... or is it $FF?... and
  199. the lines will vanish.
  200.  
  201.     [Mike:] I also ran a few old
  202. demos..and someone (tfo?) was
  203. blabbing about how this border was
  204. opened up via FLD and the other one
  205. wasn't..etc., etc?  How does FLD open
  206. up a border?
  207.  
  208.     [Style:] Is it true it becomes
  209. +$x9ff when extended color mode is
  210. on?
  211.  
  212.     [Firefoot:] Style, I have never
  213. heard that, but I have never used
  214. extended color mode while doing any
  215. of those.
  216.  
  217.     [Firefoot:] Mike, the "fld
  218. opening up the side borders" thing
  219. basically uses the stable raster
  220. created with the fld to open the side
  221. borders.  Easier than other methods,
  222. like the double raster method, but
  223. sloppy, in my opinion.  besides, you
  224. can't get text or gfx....
  225.  
  226.     [Mike:] Firefoot, that is all
  227. well and good..but "How do you open
  228. up the nice sideborders?...period"...
  229. Apparently, you are telling me that
  230. the FLD is used as an "index" in this
  231. case.
  232.  
  233.     [Firefoot:] Oh... well... Do you
  234. know how to open the top/bottom
  235. borders (the theory behind it)?
  236.  
  237.     [Waveform:] Well, if you time it
  238. right, you make the screen 38 columns
  239. instead of 40 right at the last cycle
  240. on the raster.
  241.  
  242.     [Mike:] Only thing I know how to
  243. do is 38/40 column it... :D
  244.  
  245.     [Waveform:] Then on the next
  246. cycle, the vic thinks it has already
  247. started displaying the border... so
  248. it doesn't start.
  249.  
  250.     [Style:] Which location is the
  251. gfx behind an open side border???
  252.  
  253.     [CRoth:] Waveform:  I've tried to
  254. do that, failed miserably.
  255.  
  256.     [Waveform:] Style: VICBASE +
  257. $3fff
  258.  
  259.     [Waveform:] Anytime you open a
  260. border or open screen space and the
  261. vic doesn't have normal info to fill
  262. it will it takes the last byte in its
  263. address space and sticks it in
  264. there.
  265.  
  266.     [Firefoot:] Croth: Did you make a
  267. stable raster first?  Without that
  268. you will fail miserably.
  269.  
  270.     [CRoth:] Firefoot:  I couldn't
  271. figure it out.  Had a friend of mine
  272. explain it to me, he was a genius
  273. when it came to that.  :)
  274.  
  275.     [Mike:] What about TWO FLD's?  I
  276. could swear I have seen one FLD
  277. bounce and then another bounce the
  278. screen behind it!  Is this lunacy on
  279. my part?
  280.  
  281.     [Waveform:] No it isn't, you stop
  282. one FLD...The VIC starts
  283. drawing...then later on, you start
  284. another FLD... You get two open
  285. spaces on your screen!
  286.  
  287.     [Style:] And if you can be
  288. bothered, you can make a FLD on every
  289. line & slice the picture up :D
  290.  
  291.     [Waveform:] FLD make the whole
  292. screen data move down and up. You can
  293. achieve similar effects with
  294. sprites... just make all the Y coords
  295. go up and down.
  296.  
  297.     [Mike:] Ok..can you limit how
  298. WIDE the FLD is ?  Or is it always
  299. full-screen?
  300.  
  301.     [Waveform:] You can't FLD on
  302. every line... can you? doesn't that
  303. pooch your pic? I've seen every eight
  304. lines... but every line?!?!  I
  305. thought that if you FLD after the VIC
  306. draws on the next line, you get a
  307. STRETCH, don't you?
  308.  
  309.     [Style:] Wave, check out "Finely
  310. Sliced" by Christopher Jam.
  311.  
  312.     [Firefoot:] Mike, I think the FLD
  313. is always fullscreen wide.  I can't
  314. see how it wouldn't be.
  315.  
  316.     [Firefoot:] Same here Wave, I've
  317. only seen every 8 lines as well.
  318. Perhaps you could do some sort of
  319. weird cross between FLI and FLD to
  320. get every line.  Of course, the